package com.commution.hit.common.sys;

import java.util.ArrayList;
import java.util.List;

import com.github.pagehelper.Page;

/**
 * @author Administrator
 * @param <T>
 *            分页工具
 */
public class GridResult<T> {

	public GridResult() {
		super();
	}

	public GridResult(List<T> list) {
		if (list instanceof Page) {
			Page page = (Page) list;
			this.rows = page;
			this.total = page.getTotal();
		}
	}

	// 传递到页面的数据
	private List<T> rows = new ArrayList<T>();
	// 总记录数
	private long total = 0L;

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}
}